home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / idl / nsIProgressDialog.idl < prev    next >
Text File  |  2006-05-08  |  4KB  |  101 lines

  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
  2.  *
  3.  * ***** BEGIN LICENSE BLOCK *****
  4.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  5.  *
  6.  * The contents of this file are subject to the Mozilla Public License Version
  7.  * 1.1 (the "License"); you may not use this file except in compliance with
  8.  * the License. You may obtain a copy of the License at
  9.  * http://www.mozilla.org/MPL/
  10.  *
  11.  * Software distributed under the License is distributed on an "AS IS" basis,
  12.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  13.  * for the specific language governing rights and limitations under the
  14.  * License.
  15.  *
  16.  * The Original Code is mozilla.org code.
  17.  *
  18.  * The Initial Developer of the Original Code is
  19.  * Netscape Communications Corporation.
  20.  * Portions created by the Initial Developer are Copyright (C) 1998
  21.  * the Initial Developer. All Rights Reserved.
  22.  *
  23.  * Contributor(s):
  24.  *   Bill Law    law@netscape.com
  25.  *
  26.  * Alternatively, the contents of this file may be used under the terms of
  27.  * either the GNU General Public License Version 2 or later (the "GPL"), or
  28.  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  29.  * in which case the provisions of the GPL or the LGPL are applicable instead
  30.  * of those above. If you wish to allow use of your version of this file only
  31.  * under the terms of either the GPL or the LGPL, and not to allow others to
  32.  * use your version of this file under the terms of the MPL, indicate your
  33.  * decision by deleting the provisions above and replace them with the notice
  34.  * and other provisions required by the GPL or the LGPL. If you do not delete
  35.  * the provisions above, a recipient may use your version of this file under
  36.  * the terms of any one of the MPL, the GPL or the LGPL.
  37.  *
  38.  * ***** END LICENSE BLOCK ***** */
  39.  
  40. #include "nsIDownload.idl"
  41.  
  42. interface nsIDOMWindow;
  43. interface nsIObserver;
  44.  
  45. /* nsIProgressDialog
  46.  *
  47.  * These objects are used to display progress notifications to the user.
  48.  * They are displayed while files are being saved to disk, for example.
  49.  * 
  50.  * Typical usage is to:
  51.  *   1. Create an instance, via the component manager CreateInstance()
  52.  *      method.
  53.  *   2. Set appropriate attributes that control the display and behavior
  54.  *      of the dialog.
  55.  *   3. Open the dialog.
  56.  *   4. Send progress notifications to the dialog, via it's 
  57.  *      nsIWebProgressListener methods.
  58.  *   5. Close the dialog when the operation completes, or when the user
  59.  *      closes it manually.
  60.  *   6. Release the instance.  The instance will be referenced by
  61.  *      the dialog itself, so it won't get freed until the dialog closes.
  62.  *      The dialog will keep the instance alive, so typically one does
  63.  *      not need to hold a reference to it.
  64.  */
  65.  
  66. [scriptable, uuid(20e790a2-76c6-462d-851a-22ab6cbbe48b)]
  67. interface nsIProgressDialog : nsIDownload {
  68.    /**
  69.     * Open the dialog
  70.     *
  71.     * @param aParent  Parent window; optional (if null, then
  72.     *                 a top-level window is created)
  73.     */
  74.    void open( in nsIDOMWindow aParent );
  75.    
  76.    /**
  77.     * Whether the download should be cancelled when the progress
  78.     * dialog is closed using the standard OS close box.  This is
  79.     * useful for showing the progress dialog as an information
  80.     * window, which is what download manager does.
  81.     */
  82.    attribute PRBool cancelDownloadOnClose;
  83.  
  84.    /**
  85.     * Observer for this dialog. If set, receives the following topics:
  86.     *   oncancel - observer should cancel the transfer
  87.     *   onpause  - observer should suspend the transfer
  88.     *   onresume - observer should resume the suspended transfer
  89.     * For each of those, the subject will be the nsIProgressDialog.
  90.     */
  91.    attribute nsIObserver observer;
  92.  
  93.   /**
  94.    * The dialog object itself.  This might be null if the dialog isn't
  95.    * open yet, or has been closed.
  96.    */   
  97.    attribute nsIDOMWindow dialog;
  98. };
  99.  
  100.  
  101.